from odoo import api, fields, models, _


class Commodity(models.Model):
    _name = 'check.commodity'
    _description = "增加消费的商品"

    name = fields.Char(
        '商品名称',
    )

    unit_price = fields.Monetary(
        '单价',
        'currency_id'
    )

    currency_id = fields.Many2one(
        'res.currency',
        default=lambda self: self.env.user.company_id.currency_id,
        )  # price helper


    inventory = fields.Float(
        '库存'
    )

    # 增加消费
    consume_id = fields.Many2one(
        'check.commodity'
    )





